package org.flashbrighton.as3bots.components 
{
	import org.flashbrighton.as3bots.models.BotModel;
	
	public class BotScannerComponent implements IComponent
	{
		public static const SCAN_TIME_INTERVAL:int = 10;
		private var scanTimer:int = 0;

		public function BotScannerComponent() 
		{
		}
		
		public function update(botModel:BotModel):void
		{
			scanTimer--;
			if(scanTimer<0){
				botModel.scanReady = true;
				scanTimer = SCAN_TIME_INTERVAL;
			}else{
				botModel.scanReady = false;
			}
		}
		
	}

}